<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
<!-- qrawfont.cpp -->
  <title>QRawFont Class | Qt GUI 5.14.2</title>
  <link rel="stylesheet" type="text/css" href="style/offline-simple.css" />
  <script type="text/javascript">
    document.getElementsByTagName("link").item(0).setAttribute("href", "style/offline.css");
    // loading style sheet breaks anchors that were jumped to before
    // so force jumping to anchor again
    setTimeout(function() {
        var anchor = location.hash;
        // need to jump to different anchor first (e.g. none)
        location.hash = "#";
        setTimeout(function() {
            location.hash = anchor;
        }, 0);
    }, 0);
  </script>
</head>
<body>
<div class="header" id="qtdocheader">
  <div class="main">
    <div class="main-rounded">
      <div class="navigationbar">
        <table><tr>
<td ><a href="../qtdoc/index.html">Qt 5.14</a></td><td ><a href="qtgui-index.html">Qt GUI</a></td><td ><a href="qtgui-module.html">C++ Classes</a></td><td >QRawFont</td></tr></table><table class="buildversion"><tr>
<td id="buildversion" width="100%" align="right"><a href="qtgui-index.html">Qt 5.14.2 Reference Documentation</a></td>
        </tr></table>
      </div>
    </div>
<div class="content">
<div class="line">
<div class="content mainContent">
<div class="sidebar">
<div class="toc">
<h3><a name="toc">Contents</a></h3>
<ul>
<li class="level1"><a href="#public-types">Public Types</a></li>
<li class="level1"><a href="#public-functions">Public Functions</a></li>
<li class="level1"><a href="#static-public-members">Static Public Members</a></li>
<li class="level1"><a href="#related-non-members">Related Non-Members</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
</ul>
</div>
<div class="sidebar-content" id="sidebar-content"></div></div>
<h1 class="title">QRawFont Class</h1>
<!-- $$$QRawFont-brief -->
<p>The QRawFont class provides access to a single physical instance of a font. <a href="#details">More...</a></p>
<!-- @@@QRawFont -->
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign">   <span class="preprocessor">#include &lt;QRawFont&gt;</span>
</td></tr><tr><td class="memItemLeft rightAlign topAlign"> qmake:</td><td class="memItemRight bottomAlign"> QT += gui</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Since:</td><td class="memItemRight bottomAlign"> Qt 4.8</td></tr></table></div><p>This class was introduced in Qt 4.8.</p>
<ul>
<li><a href="qrawfont-members.html">List of all members, including inherited members</a></li>
</ul>
<a name="public-types"></a>
<h2 id="public-types">Public Types</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qrawfont.html#AntialiasingType-enum">AntialiasingType</a></b> { PixelAntialiasing, SubPixelAntialiasing }</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qrawfont.html#LayoutFlag-enum">LayoutFlag</a></b> { SeparateAdvances, KernedAdvances, UseDesignMetrics }</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> flags </td><td class="memItemRight bottomAlign"><b><a href="qrawfont.html#LayoutFlag-enum">LayoutFlags</a></b></td></tr>
</table></div>
<a name="public-functions"></a>
<h2 id="public-functions">Public Functions</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qrawfont.html#QRawFont-3">QRawFont</a></b>(const QRawFont &amp;<i>other</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qrawfont.html#QRawFont-2">QRawFont</a></b>(const QByteArray &amp;<i>fontData</i>, qreal <i>pixelSize</i>, QFont::HintingPreference <i>hintingPreference</i> = QFont::PreferDefaultHinting)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qrawfont.html#QRawFont-1">QRawFont</a></b>(const QString &amp;<i>fileName</i>, qreal <i>pixelSize</i>, QFont::HintingPreference <i>hintingPreference</i> = QFont::PreferDefaultHinting)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qrawfont.html#QRawFont">QRawFont</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QRawFont &amp;</td><td class="memItemRight bottomAlign"><b><a href="qrawfont.html#operator-eq-1">operator=</a></b>(const QRawFont &amp;<i>other</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qrawfont.html#dtor.QRawFont">~QRawFont</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QVector&lt;QPointF&gt; </td><td class="memItemRight bottomAlign"><b><a href="qrawfont.html#advancesForGlyphIndexes">advancesForGlyphIndexes</a></b>(const QVector&lt;quint32&gt; &amp;<i>glyphIndexes</i>, QRawFont::LayoutFlags <i>layoutFlags</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QVector&lt;QPointF&gt; </td><td class="memItemRight bottomAlign"><b><a href="qrawfont.html#advancesForGlyphIndexes-1">advancesForGlyphIndexes</a></b>(const QVector&lt;quint32&gt; &amp;<i>glyphIndexes</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qrawfont.html#advancesForGlyphIndexes-2">advancesForGlyphIndexes</a></b>(const quint32 *<i>glyphIndexes</i>, QPointF *<i>advances</i>, int <i>numGlyphs</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qrawfont.html#advancesForGlyphIndexes-3">advancesForGlyphIndexes</a></b>(const quint32 *<i>glyphIndexes</i>, QPointF *<i>advances</i>, int <i>numGlyphs</i>, QRawFont::LayoutFlags <i>layoutFlags</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QImage </td><td class="memItemRight bottomAlign"><b><a href="qrawfont.html#alphaMapForGlyph">alphaMapForGlyph</a></b>(quint32 <i>glyphIndex</i>, QRawFont::AntialiasingType <i>antialiasingType</i> = SubPixelAntialiasing, const QTransform &amp;<i>transform</i> = QTransform()) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> qreal </td><td class="memItemRight bottomAlign"><b><a href="qrawfont.html#ascent">ascent</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> qreal </td><td class="memItemRight bottomAlign"><b><a href="qrawfont.html#averageCharWidth">averageCharWidth</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QRectF </td><td class="memItemRight bottomAlign"><b><a href="qrawfont.html#boundingRect">boundingRect</a></b>(quint32 <i>glyphIndex</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> qreal </td><td class="memItemRight bottomAlign"><b><a href="qrawfont.html#capHeight">capHeight</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> qreal </td><td class="memItemRight bottomAlign"><b><a href="qrawfont.html#descent">descent</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="qrawfont.html#familyName">familyName</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QByteArray </td><td class="memItemRight bottomAlign"><b><a href="qrawfont.html#fontTable">fontTable</a></b>(const char *<i>tagName</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qrawfont.html#glyphIndexesForChars">glyphIndexesForChars</a></b>(const QChar *<i>chars</i>, int <i>numChars</i>, quint32 *<i>glyphIndexes</i>, int *<i>numGlyphs</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QVector&lt;quint32&gt; </td><td class="memItemRight bottomAlign"><b><a href="qrawfont.html#glyphIndexesForString">glyphIndexesForString</a></b>(const QString &amp;<i>text</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QFont::HintingPreference </td><td class="memItemRight bottomAlign"><b><a href="qrawfont.html#hintingPreference">hintingPreference</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qrawfont.html#isValid">isValid</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> qreal </td><td class="memItemRight bottomAlign"><b><a href="qrawfont.html#leading">leading</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> qreal </td><td class="memItemRight bottomAlign"><b><a href="qrawfont.html#lineThickness">lineThickness</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qrawfont.html#loadFromData">loadFromData</a></b>(const QByteArray &amp;<i>fontData</i>, qreal <i>pixelSize</i>, QFont::HintingPreference <i>hintingPreference</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qrawfont.html#loadFromFile">loadFromFile</a></b>(const QString &amp;<i>fileName</i>, qreal <i>pixelSize</i>, QFont::HintingPreference <i>hintingPreference</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> qreal </td><td class="memItemRight bottomAlign"><b><a href="qrawfont.html#maxCharWidth">maxCharWidth</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QPainterPath </td><td class="memItemRight bottomAlign"><b><a href="qrawfont.html#pathForGlyph">pathForGlyph</a></b>(quint32 <i>glyphIndex</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> qreal </td><td class="memItemRight bottomAlign"><b><a href="qrawfont.html#pixelSize">pixelSize</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qrawfont.html#setPixelSize">setPixelSize</a></b>(qreal <i>pixelSize</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QFont::Style </td><td class="memItemRight bottomAlign"><b><a href="qrawfont.html#style">style</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="qrawfont.html#styleName">styleName</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QList&lt;QFontDatabase::WritingSystem&gt; </td><td class="memItemRight bottomAlign"><b><a href="qrawfont.html#supportedWritingSystems">supportedWritingSystems</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qrawfont.html#supportsCharacter">supportsCharacter</a></b>(QChar <i>character</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qrawfont.html#supportsCharacter-1">supportsCharacter</a></b>(uint <i>ucs4</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qrawfont.html#swap">swap</a></b>(QRawFont &amp;<i>other</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> qreal </td><td class="memItemRight bottomAlign"><b><a href="qrawfont.html#underlinePosition">underlinePosition</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> qreal </td><td class="memItemRight bottomAlign"><b><a href="qrawfont.html#unitsPerEm">unitsPerEm</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qrawfont.html#weight">weight</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> qreal </td><td class="memItemRight bottomAlign"><b><a href="qrawfont.html#xHeight">xHeight</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qrawfont.html#operator-not-eq">operator!=</a></b>(const QRawFont &amp;<i>other</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qrawfont.html#operator-eq-eq">operator==</a></b>(const QRawFont &amp;<i>other</i>) const</td></tr>
</table></div>
<a name="static-public-members"></a>
<h2 id="static-public-members">Static Public Members</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> QRawFont </td><td class="memItemRight bottomAlign"><b><a href="qrawfont.html#fromFont">fromFont</a></b>(const QFont &amp;<i>font</i>, QFontDatabase::WritingSystem <i>writingSystem</i> = QFontDatabase::Any)</td></tr>
</table></div>
<a name="related-non-members"></a>
<h2 id="related-non-members">Related Non-Members</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> uint </td><td class="memItemRight bottomAlign"><b><a href="qrawfont.html#qHash-4">qHash</a></b>(const QRawFont &amp;<i>font</i>, uint <i>seed</i> = 0)</td></tr>
</table></div>
<a name="details"></a>
<!-- $$$QRawFont-description -->
<div class="descr">
<h2 id="details">Detailed Description</h2>
<p><b>Note: </b>QRawFont is a low level class. For most purposes <a href="qfont.html">QFont</a> is a more appropriate class.</p><p>Most commonly, when presenting text in a user interface, the exact fonts used to render the characters is to some extent unknown. This can be the case for several reasons: For instance, the actual, physical fonts present on the target system could be unexpected to the developers, or the text could contain user selected styles, sizes or writing systems that are not supported by font chosen in the code.</p>
<p>Therefore, Qt's <a href="qfont.html">QFont</a> class really represents a query for fonts. When text is interpreted, Qt will do its best to match the text to the query, but depending on the support, different fonts can be used behind the scenes.</p>
<p>For most use cases, this is both expected and necessary, as it minimizes the possibility of text in the user interface being undisplayable. In some cases, however, more direct control over the process might be useful. It is for these use cases the QRawFont class exists.</p>
<p>A QRawFont object represents a single, physical instance of a given font in a given pixel size. I.e&#x2e; in the typical case it represents a set of TrueType or OpenType font tables and uses a user specified pixel size to convert metrics into logical pixel units. It can be used in combination with the <a href="qglyphrun.html">QGlyphRun</a> class to draw specific glyph indexes at specific positions, and also have accessors to some relevant data in the physical font.</p>
<p>QRawFont only provides support for the main font technologies: GDI and DirectWrite on Windows platforms, <a href="qtgui-attribution-freetype.html#freetype">FreeType</a> on Linux platforms and CoreText on macOS. For other font back-ends, the APIs will be disabled.</p>
<p>QRawFont can be constructed in a number of ways:</p>
<ul>
<li>It can be constructed by calling QTextLayout::glyphs() or QTextFragment::glyphs(). The returned QGlyphs objects will contain QRawFont objects which represent the actual fonts used to render each portion of the text.</li>
<li>It can be constructed by passing a <a href="qfont.html">QFont</a> object to <a href="qrawfont.html#fromFont">QRawFont::fromFont</a>(). The function will return a QRawFont object representing the font that will be selected as response to the <a href="qfont.html">QFont</a> query and the selected writing system.</li>
<li>It can be constructed by passing a file name or <a href="../qtcore/qbytearray.html">QByteArray</a> directly to the QRawFont constructor, or by calling <a href="qrawfont.html#loadFromFile">loadFromFile</a>() or <a href="qrawfont.html#loadFromData">loadFromData</a>(). In this case, the font will not be registered in <a href="qfontdatabase.html">QFontDatabase</a>, and it will not be available as part of regular font selection.</li>
</ul>
<p>QRawFont is considered local to the thread in which it is constructed (either using a constructor, or by calling <a href="qrawfont.html#loadFromData">loadFromData</a>() or <a href="qrawfont.html#loadFromFile">loadFromFile</a>()). The QRawFont cannot be moved to a different thread, but will have to be recreated in the thread in question.</p>
<p><b>Note: </b>For the requirement of caching glyph indexes and font selections for static text to avoid reshaping and relayouting in the inner loop of an application, a better choice is the <a href="qstatictext.html">QStaticText</a> class, since it optimizes the memory cost of the cache and also provides the possibility of paint engine specific caches for an additional speed-up.</p></div>
<!-- @@@QRawFont -->
<div class="types">
<h2>Member Type Documentation</h2>
<!-- $$$AntialiasingType$$$PixelAntialiasing$$$SubPixelAntialiasing -->
<h3 class="fn" id="AntialiasingType-enum"><a name="AntialiasingType-enum"></a>enum QRawFont::<span class="name">AntialiasingType</span></h3>
<p>This enum represents the different ways a glyph can be rasterized in the function <a href="qrawfont.html#alphaMapForGlyph">alphaMapForGlyph</a>().</p>
<div class="table"><table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><code>QRawFont::PixelAntialiasing</code></td><td class="topAlign tblval"><code>0</code></td><td class="topAlign">Will rasterize by measuring the coverage of the shape on whole pixels. The returned image contains the alpha values of each pixel based on the coverage of the glyph shape.</td></tr>
<tr><td class="topAlign"><code>QRawFont::SubPixelAntialiasing</code></td><td class="topAlign tblval"><code>1</code></td><td class="topAlign">Will rasterize by measuring the coverage of each subpixel, returning a separate alpha value for each of the red, green and blue components of each pixel.</td></tr>
</table></div>
<!-- @@@AntialiasingType -->
<!-- $$$LayoutFlag$$$SeparateAdvances$$$KernedAdvances$$$UseDesignMetrics -->
<h3 class="flags" id="LayoutFlag-enum"><a name="LayoutFlag-enum"></a>enum QRawFont::<span class="name">LayoutFlag</span><br/>flags QRawFont::<span class="name">LayoutFlags</span></h3>
<p>This enum tells the function <a href="qrawfont.html#advancesForGlyphIndexes">advancesForGlyphIndexes</a>() how to calculate the advances.</p>
<div class="table"><table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><code>QRawFont::SeparateAdvances</code></td><td class="topAlign tblval"><code>0</code></td><td class="topAlign">Will calculate the advance for each glyph separately.</td></tr>
<tr><td class="topAlign"><code>QRawFont::KernedAdvances</code></td><td class="topAlign tblval"><code>1</code></td><td class="topAlign">Will apply kerning between adjacent glyphs. Note that OpenType GPOS based kerning is currently not supported.</td></tr>
<tr><td class="topAlign"><code>QRawFont::UseDesignMetrics</code></td><td class="topAlign tblval"><code>2</code></td><td class="topAlign">Use design metrics instead of hinted metrics adjusted to the resolution of the paint device. Can be OR-ed with any of the options above.</td></tr>
</table></div>
<p>This enum was introduced or modified in Qt 5.1.</p>
<p>The LayoutFlags type is a typedef for <a href="../qtcore/qflags.html">QFlags</a>&lt;LayoutFlag&gt;. It stores an OR combination of LayoutFlag values.</p>
<!-- @@@LayoutFlag -->
</div>
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$QRawFont$$$QRawFontconstQRawFont& -->
<h3 class="fn" id="QRawFont-3"><a name="QRawFont-3"></a>QRawFont::<span class="name">QRawFont</span>(const <span class="type"><a href="qrawfont.html#QRawFont">QRawFont</a></span> &amp;<i>other</i>)</h3>
<p>Creates a QRawFont which is a copy of <i>other</i>.</p>
<!-- @@@QRawFont -->
<!-- $$$QRawFont$$$QRawFontconstQByteArray&qrealQFont::HintingPreference -->
<h3 class="fn" id="QRawFont-2"><a name="QRawFont-2"></a>QRawFont::<span class="name">QRawFont</span>(const <span class="type"><a href="../qtcore/qbytearray.html">QByteArray</a></span> &amp;<i>fontData</i>, <span class="type"><a href="../qtcore/qtglobal.html#qreal-typedef">qreal</a></span> <i>pixelSize</i>, <span class="type"><a href="qfont.html#HintingPreference-enum">QFont::HintingPreference</a></span> <i>hintingPreference</i> = QFont::PreferDefaultHinting)</h3>
<p>Constructs a QRawFont representing the font contained in the supplied <i>fontData</i> for the size (in pixels) given by <i>pixelSize</i>, and using the hinting preference specified by <i>hintingPreference</i>.</p>
<p><b>Note: </b>The data must contain a TrueType or OpenType font.</p><!-- @@@QRawFont -->
<!-- $$$QRawFont$$$QRawFontconstQString&qrealQFont::HintingPreference -->
<h3 class="fn" id="QRawFont-1"><a name="QRawFont-1"></a>QRawFont::<span class="name">QRawFont</span>(const <span class="type"><a href="../qtcore/qstring.html">QString</a></span> &amp;<i>fileName</i>, <span class="type"><a href="../qtcore/qtglobal.html#qreal-typedef">qreal</a></span> <i>pixelSize</i>, <span class="type"><a href="qfont.html#HintingPreference-enum">QFont::HintingPreference</a></span> <i>hintingPreference</i> = QFont::PreferDefaultHinting)</h3>
<p>Constructs a QRawFont representing the font contained in the file referenced by <i>fileName</i> for the size (in pixels) given by <i>pixelSize</i>, and using the hinting preference specified by <i>hintingPreference</i>.</p>
<p><b>Note: </b>The referenced file must contain a TrueType or OpenType font.</p><!-- @@@QRawFont -->
<!-- $$$QRawFont[overload1]$$$QRawFont -->
<h3 class="fn" id="QRawFont"><a name="QRawFont"></a>QRawFont::<span class="name">QRawFont</span>()</h3>
<p>Constructs an invalid QRawFont.</p>
<!-- @@@QRawFont -->
<!-- $$$operator=$$$operator=constQRawFont& -->
<h3 class="fn" id="operator-eq-1"><a name="operator-eq-1"></a><span class="type"><a href="qrawfont.html#QRawFont">QRawFont</a></span> &amp;QRawFont::<span class="name">operator=</span>(const <span class="type"><a href="qrawfont.html#QRawFont">QRawFont</a></span> &amp;<i>other</i>)</h3>
<p>Assigns <i>other</i> to this <a href="qrawfont.html">QRawFont</a>.</p>
<!-- @@@operator= -->
<!-- $$$~QRawFont[overload1]$$$~QRawFont -->
<h3 class="fn" id="dtor.QRawFont"><a name="dtor.QRawFont"></a>QRawFont::<span class="name">~QRawFont</span>()</h3>
<p>Destroys the <a href="qrawfont.html">QRawFont</a></p>
<!-- @@@~QRawFont -->
<!-- $$$advancesForGlyphIndexes[overload1]$$$advancesForGlyphIndexesconstQVector<quint32>&QRawFont::LayoutFlags -->
<h3 class="fn" id="advancesForGlyphIndexes"><a name="advancesForGlyphIndexes"></a><span class="type"><a href="../qtcore/qvector.html">QVector</a></span>&lt;<span class="type"><a href="../qtcore/qpointf.html">QPointF</a></span>&gt; QRawFont::<span class="name">advancesForGlyphIndexes</span>(const <span class="type"><a href="../qtcore/qvector.html">QVector</a></span>&lt;<span class="type"><a href="../qtcore/qtglobal.html#quint32-typedef">quint32</a></span>&gt; &amp;<i>glyphIndexes</i>, <span class="type"><a href="qrawfont.html#LayoutFlag-enum">QRawFont::LayoutFlags</a></span> <i>layoutFlags</i>) const</h3>
<p>Returns the <a href="qrawfont.html">QRawFont</a>'s advances for each of the <i>glyphIndexes</i> in pixel units. The advances give the distance from the position of a given glyph to where the next glyph should be drawn to make it appear as if the two glyphs are unspaced. How the advances are calculated is controlled by <i>layoutFlags</i>.</p>
<p>This function was introduced in Qt 5.1.</p>
<p><b>See also </b><a href="qtextline.html#horizontalAdvance">QTextLine::horizontalAdvance</a>() and <a href="qfontmetricsf-obsolete.html#width">QFontMetricsF::width</a>().</p>
<!-- @@@advancesForGlyphIndexes -->
<!-- $$$advancesForGlyphIndexes$$$advancesForGlyphIndexesconstQVector<quint32>& -->
<h3 class="fn" id="advancesForGlyphIndexes-1"><a name="advancesForGlyphIndexes-1"></a><span class="type"><a href="../qtcore/qvector.html">QVector</a></span>&lt;<span class="type"><a href="../qtcore/qpointf.html">QPointF</a></span>&gt; QRawFont::<span class="name">advancesForGlyphIndexes</span>(const <span class="type"><a href="../qtcore/qvector.html">QVector</a></span>&lt;<span class="type"><a href="../qtcore/qtglobal.html#quint32-typedef">quint32</a></span>&gt; &amp;<i>glyphIndexes</i>) const</h3>
<p>This is an overloaded function.</p>
<p>Returns the <a href="qrawfont.html">QRawFont</a>'s advances for each of the <i>glyphIndexes</i> in pixel units. The advances give the distance from the position of a given glyph to where the next glyph should be drawn to make it appear as if the two glyphs are unspaced. The advance of each glyph is calculated separately.</p>
<p><b>See also </b><a href="qtextline.html#horizontalAdvance">QTextLine::horizontalAdvance</a>() and <a href="qfontmetricsf-obsolete.html#width">QFontMetricsF::width</a>().</p>
<!-- @@@advancesForGlyphIndexes -->
<!-- $$$advancesForGlyphIndexes$$$advancesForGlyphIndexesconstquint32*QPointF*int -->
<h3 class="fn" id="advancesForGlyphIndexes-2"><a name="advancesForGlyphIndexes-2"></a><span class="type">bool</span> QRawFont::<span class="name">advancesForGlyphIndexes</span>(const <span class="type"><a href="../qtcore/qtglobal.html#quint32-typedef">quint32</a></span> *<i>glyphIndexes</i>, <span class="type"><a href="../qtcore/qpointf.html">QPointF</a></span> *<i>advances</i>, <span class="type">int</span> <i>numGlyphs</i>) const</h3>
<p>This is an overloaded function.</p>
<p>Returns the <a href="qrawfont.html">QRawFont</a>'s advances for each of the <i>glyphIndexes</i> in pixel units. The advances give the distance from the position of a given glyph to where the next glyph should be drawn to make it appear as if the two glyphs are unspaced. The glyph indexes are given with the array <i>glyphIndexes</i> while the results are returned through <i>advances</i>, both of them must have <i>numGlyphs</i> elements. The advance of each glyph is calculated separately</p>
<p><b>See also </b><a href="qtextline.html#horizontalAdvance">QTextLine::horizontalAdvance</a>() and <a href="qfontmetricsf-obsolete.html#width">QFontMetricsF::width</a>().</p>
<!-- @@@advancesForGlyphIndexes -->
<!-- $$$advancesForGlyphIndexes$$$advancesForGlyphIndexesconstquint32*QPointF*intQRawFont::LayoutFlags -->
<h3 class="fn" id="advancesForGlyphIndexes-3"><a name="advancesForGlyphIndexes-3"></a><span class="type">bool</span> QRawFont::<span class="name">advancesForGlyphIndexes</span>(const <span class="type"><a href="../qtcore/qtglobal.html#quint32-typedef">quint32</a></span> *<i>glyphIndexes</i>, <span class="type"><a href="../qtcore/qpointf.html">QPointF</a></span> *<i>advances</i>, <span class="type">int</span> <i>numGlyphs</i>, <span class="type"><a href="qrawfont.html#LayoutFlag-enum">QRawFont::LayoutFlags</a></span> <i>layoutFlags</i>) const</h3>
<p>Returns the <a href="qrawfont.html">QRawFont</a>'s advances for each of the <i>glyphIndexes</i> in pixel units. The advances give the distance from the position of a given glyph to where the next glyph should be drawn to make it appear as if the two glyphs are unspaced. The glyph indexes are given with the array <i>glyphIndexes</i> while the results are returned through <i>advances</i>, both of them must have <i>numGlyphs</i> elements. How the advances are calculated is controlled by <i>layoutFlags</i>.</p>
<p>This function was introduced in Qt 5.1.</p>
<p><b>See also </b><a href="qtextline.html#horizontalAdvance">QTextLine::horizontalAdvance</a>() and <a href="qfontmetricsf-obsolete.html#width">QFontMetricsF::width</a>().</p>
<!-- @@@advancesForGlyphIndexes -->
<!-- $$$alphaMapForGlyph[overload1]$$$alphaMapForGlyphquint32QRawFont::AntialiasingTypeconstQTransform& -->
<h3 class="fn" id="alphaMapForGlyph"><a name="alphaMapForGlyph"></a><span class="type"><a href="qimage.html">QImage</a></span> QRawFont::<span class="name">alphaMapForGlyph</span>(<span class="type"><a href="../qtcore/qtglobal.html#quint32-typedef">quint32</a></span> <i>glyphIndex</i>, <span class="type"><a href="qrawfont.html#AntialiasingType-enum">QRawFont::AntialiasingType</a></span> <i>antialiasingType</i> = SubPixelAntialiasing, const <span class="type"><a href="qtransform.html">QTransform</a></span> &amp;<i>transform</i> = QTransform()) const</h3>
<p>This function returns a rasterized image of the glyph at the given <i>glyphIndex</i> in the underlying font, using the <i>transform</i> specified. If the <a href="qrawfont.html">QRawFont</a> is not valid, this function will return an invalid <a href="qimage.html">QImage</a>.</p>
<p>If the font is a color font, then the resulting image will contain the rendered glyph at the current pixel size. In this case, the <i>antialiasingType</i> will be ignored.</p>
<p>Otherwise, if <i>antialiasingType</i> is set to <a href="qrawfont.html#AntialiasingType-enum">QRawFont::SubPixelAntialiasing</a>, then the resulting image will be in <a href="qimage.html#Format-enum">QImage::Format_RGB32</a> and the RGB values of each pixel will represent the subpixel opacities of the pixel in the rasterization of the glyph. Otherwise, the image will be in the format of <a href="qimage.html#Format-enum">QImage::Format_Indexed8</a> and each pixel will contain the opacity of the pixel in the rasterization.</p>
<p><b>See also </b><a href="qrawfont.html#pathForGlyph">pathForGlyph</a>() and <a href="qpainter.html#drawGlyphRun">QPainter::drawGlyphRun</a>().</p>
<!-- @@@alphaMapForGlyph -->
<!-- $$$ascent[overload1]$$$ascent -->
<h3 class="fn" id="ascent"><a name="ascent"></a><span class="type"><a href="../qtcore/qtglobal.html#qreal-typedef">qreal</a></span> QRawFont::<span class="name">ascent</span>() const</h3>
<p>Returns the ascent of this <a href="qrawfont.html">QRawFont</a> in pixel units.</p>
<p>The ascent of a font is the distance from the baseline to the highest position characters extend to. In practice, some font designers break this rule, e.g&#x2e; when they put more than one accent on top of a character, or to accommodate an unusual character in an exotic language, so it is possible (though rare) that this value will be too small.</p>
<p><b>See also </b><a href="qfontmetricsf.html#ascent">QFontMetricsF::ascent</a>().</p>
<!-- @@@ascent -->
<!-- $$$averageCharWidth[overload1]$$$averageCharWidth -->
<h3 class="fn" id="averageCharWidth"><a name="averageCharWidth"></a><span class="type"><a href="../qtcore/qtglobal.html#qreal-typedef">qreal</a></span> QRawFont::<span class="name">averageCharWidth</span>() const</h3>
<p>Returns the average character width of this <a href="qrawfont.html">QRawFont</a> in pixel units.</p>
<p><b>See also </b><a href="qfontmetricsf.html#averageCharWidth">QFontMetricsF::averageCharWidth</a>().</p>
<!-- @@@averageCharWidth -->
<!-- $$$boundingRect[overload1]$$$boundingRectquint32 -->
<h3 class="fn" id="boundingRect"><a name="boundingRect"></a><span class="type"><a href="../qtcore/qrectf.html">QRectF</a></span> QRawFont::<span class="name">boundingRect</span>(<span class="type"><a href="../qtcore/qtglobal.html#quint32-typedef">quint32</a></span> <i>glyphIndex</i>) const</h3>
<p>Returns the smallest rectangle containing the glyph with the given <i>glyphIndex</i>.</p>
<p>This function was introduced in Qt 5.0.</p>
<!-- @@@boundingRect -->
<!-- $$$capHeight[overload1]$$$capHeight -->
<h3 class="fn" id="capHeight"><a name="capHeight"></a><span class="type"><a href="../qtcore/qtglobal.html#qreal-typedef">qreal</a></span> QRawFont::<span class="name">capHeight</span>() const</h3>
<p>Returns the cap height of this <a href="qrawfont.html">QRawFont</a> in pixel units.</p>
<p>The cap height of a font is the height of a capital letter above the baseline. It specifically is the height of capital letters that are flat - such as H or I - as opposed to round letters such as O, or pointed letters like A, both of which may display overshoot.</p>
<p>This function was introduced in Qt 5.8.</p>
<p><b>See also </b><a href="qfontmetricsf.html#capHeight">QFontMetricsF::capHeight</a>().</p>
<!-- @@@capHeight -->
<!-- $$$descent[overload1]$$$descent -->
<h3 class="fn" id="descent"><a name="descent"></a><span class="type"><a href="../qtcore/qtglobal.html#qreal-typedef">qreal</a></span> QRawFont::<span class="name">descent</span>() const</h3>
<p>Returns the descent of this <a href="qrawfont.html">QRawFont</a> in pixel units.</p>
<p>The descent is the distance from the base line to the lowest point characters extend to. In practice, some font designers break this rule, e.g&#x2e; to accommodate an unusual character in an exotic language, so it is possible (though rare) that this value will be too small.</p>
<p><b>See also </b><a href="qfontmetricsf.html#descent">QFontMetricsF::descent</a>().</p>
<!-- @@@descent -->
<!-- $$$familyName[overload1]$$$familyName -->
<h3 class="fn" id="familyName"><a name="familyName"></a><span class="type"><a href="../qtcore/qstring.html">QString</a></span> QRawFont::<span class="name">familyName</span>() const</h3>
<p>Returns the family name of this <a href="qrawfont.html">QRawFont</a>.</p>
<!-- @@@familyName -->
<!-- $$$fontTable[overload1]$$$fontTableconstchar* -->
<h3 class="fn" id="fontTable"><a name="fontTable"></a><span class="type"><a href="../qtcore/qbytearray.html">QByteArray</a></span> QRawFont::<span class="name">fontTable</span>(const <span class="type">char</span> *<i>tagName</i>) const</h3>
<p>Retrieves the sfnt table named <i>tagName</i> from the underlying physical font, or an empty byte array if no such table was found. The returned font table's byte order is Big Endian, like the sfnt format specifies. The <i>tagName</i> must be four characters long and should be formatted in the default endianness of the current platform.</p>
<!-- @@@fontTable -->
<!-- $$$fromFont[overload1]$$$fromFontconstQFont&QFontDatabase::WritingSystem -->
<h3 class="fn" id="fromFont"><a name="fromFont"></a><code>[static] </code><span class="type"><a href="qrawfont.html#QRawFont">QRawFont</a></span> QRawFont::<span class="name">fromFont</span>(const <span class="type"><a href="qfont.html">QFont</a></span> &amp;<i>font</i>, <span class="type"><a href="qfontdatabase.html#WritingSystem-enum">QFontDatabase::WritingSystem</a></span> <i>writingSystem</i> = QFontDatabase::Any)</h3>
<p>Fetches the physical representation based on a <i>font</i> query. The physical font returned is the font that will be preferred by Qt in order to display text in the selected <i>writingSystem</i>.</p>
<p><b>Warning:</b> This function is potentially expensive and should not be called in performance sensitive code.</p>
<!-- @@@fromFont -->
<!-- $$$glyphIndexesForChars[overload1]$$$glyphIndexesForCharsconstQChar*intquint32*int* -->
<h3 class="fn" id="glyphIndexesForChars"><a name="glyphIndexesForChars"></a><span class="type">bool</span> QRawFont::<span class="name">glyphIndexesForChars</span>(const <span class="type"><a href="../qtcore/qchar.html">QChar</a></span> *<i>chars</i>, <span class="type">int</span> <i>numChars</i>, <span class="type"><a href="../qtcore/qtglobal.html#quint32-typedef">quint32</a></span> *<i>glyphIndexes</i>, <span class="type">int</span> *<i>numGlyphs</i>) const</h3>
<p>Converts a string of unicode points to glyph indexes using the CMAP table in the underlying font. The function works like <a href="qrawfont.html#glyphIndexesForString">glyphIndexesForString</a>() except it take an array (<i>chars</i>), the results will be returned though <i>glyphIndexes</i> array and number of glyphs will be set in <i>numGlyphs</i>. The size of <i>glyphIndexes</i> array must be at least <i>numChars</i>, if that's still not enough, this function will return false, then you can resize <i>glyphIndexes</i> from the size returned in <i>numGlyphs</i>.</p>
<p><b>See also </b><a href="qrawfont.html#glyphIndexesForString">glyphIndexesForString</a>(), <a href="qrawfont.html#advancesForGlyphIndexes">advancesForGlyphIndexes</a>(), <a href="qglyphrun.html">QGlyphRun</a>, <a href="qtextlayout.html#glyphRuns">QTextLayout::glyphRuns</a>(), and <a href="qtextfragment.html#glyphRuns">QTextFragment::glyphRuns</a>().</p>
<!-- @@@glyphIndexesForChars -->
<!-- $$$glyphIndexesForString[overload1]$$$glyphIndexesForStringconstQString& -->
<h3 class="fn" id="glyphIndexesForString"><a name="glyphIndexesForString"></a><span class="type"><a href="../qtcore/qvector.html">QVector</a></span>&lt;<span class="type"><a href="../qtcore/qtglobal.html#quint32-typedef">quint32</a></span>&gt; QRawFont::<span class="name">glyphIndexesForString</span>(const <span class="type"><a href="../qtcore/qstring.html">QString</a></span> &amp;<i>text</i>) const</h3>
<p>Converts the string of unicode points given by <i>text</i> to glyph indexes using the CMAP table in the underlying font, and returns a vector containing the result.</p>
<p>Note that, in cases where there are other tables in the font that affect the shaping of the text, the returned glyph indexes will not correctly represent the rendering of the text. To get the correctly shaped text, you can use <a href="qtextlayout.html">QTextLayout</a> to lay out and shape the text, then call QTextLayout::glyphs() to get the set of glyph index list and <a href="qrawfont.html">QRawFont</a> pairs.</p>
<p><b>See also </b><a href="qrawfont.html#advancesForGlyphIndexes">advancesForGlyphIndexes</a>(), <a href="qrawfont.html#glyphIndexesForChars">glyphIndexesForChars</a>(), <a href="qglyphrun.html">QGlyphRun</a>, <a href="qtextlayout.html#glyphRuns">QTextLayout::glyphRuns</a>(), and <a href="qtextfragment.html#glyphRuns">QTextFragment::glyphRuns</a>().</p>
<!-- @@@glyphIndexesForString -->
<!-- $$$hintingPreference[overload1]$$$hintingPreference -->
<h3 class="fn" id="hintingPreference"><a name="hintingPreference"></a><span class="type"><a href="qfont.html#HintingPreference-enum">QFont::HintingPreference</a></span> QRawFont::<span class="name">hintingPreference</span>() const</h3>
<p>Returns the hinting preference used to construct this <a href="qrawfont.html">QRawFont</a>.</p>
<p><b>See also </b><a href="qfont.html#hintingPreference">QFont::hintingPreference</a>().</p>
<!-- @@@hintingPreference -->
<!-- $$$isValid[overload1]$$$isValid -->
<h3 class="fn" id="isValid"><a name="isValid"></a><span class="type">bool</span> QRawFont::<span class="name">isValid</span>() const</h3>
<p>Returns <code>true</code> if the <a href="qrawfont.html">QRawFont</a> is valid and false otherwise.</p>
<!-- @@@isValid -->
<!-- $$$leading[overload1]$$$leading -->
<h3 class="fn" id="leading"><a name="leading"></a><span class="type"><a href="../qtcore/qtglobal.html#qreal-typedef">qreal</a></span> QRawFont::<span class="name">leading</span>() const</h3>
<p>Returns the leading of this <a href="qrawfont.html">QRawFont</a> in pixel units.</p>
<p>This is the natural inter-line spacing.</p>
<p><b>See also </b><a href="qfontmetricsf.html#leading">QFontMetricsF::leading</a>().</p>
<!-- @@@leading -->
<!-- $$$lineThickness[overload1]$$$lineThickness -->
<h3 class="fn" id="lineThickness"><a name="lineThickness"></a><span class="type"><a href="../qtcore/qtglobal.html#qreal-typedef">qreal</a></span> QRawFont::<span class="name">lineThickness</span>() const</h3>
<p>Returns the thickness for drawing lines (underline, overline, etc.) along with text drawn in this font.</p>
<!-- @@@lineThickness -->
<!-- $$$loadFromData[overload1]$$$loadFromDataconstQByteArray&qrealQFont::HintingPreference -->
<h3 class="fn" id="loadFromData"><a name="loadFromData"></a><span class="type">void</span> QRawFont::<span class="name">loadFromData</span>(const <span class="type"><a href="../qtcore/qbytearray.html">QByteArray</a></span> &amp;<i>fontData</i>, <span class="type"><a href="../qtcore/qtglobal.html#qreal-typedef">qreal</a></span> <i>pixelSize</i>, <span class="type"><a href="qfont.html#HintingPreference-enum">QFont::HintingPreference</a></span> <i>hintingPreference</i>)</h3>
<p>Replaces the current <a href="qrawfont.html">QRawFont</a> with the font contained in the supplied <i>fontData</i> for the size (in pixels) given by <i>pixelSize</i>, and using the hinting preference specified by <i>hintingPreference</i>.</p>
<p>The <i>fontData</i> must contain a TrueType or OpenType font.</p>
<p><b>See also </b><a href="qrawfont.html#loadFromFile">loadFromFile</a>().</p>
<!-- @@@loadFromData -->
<!-- $$$loadFromFile[overload1]$$$loadFromFileconstQString&qrealQFont::HintingPreference -->
<h3 class="fn" id="loadFromFile"><a name="loadFromFile"></a><span class="type">void</span> QRawFont::<span class="name">loadFromFile</span>(const <span class="type"><a href="../qtcore/qstring.html">QString</a></span> &amp;<i>fileName</i>, <span class="type"><a href="../qtcore/qtglobal.html#qreal-typedef">qreal</a></span> <i>pixelSize</i>, <span class="type"><a href="qfont.html#HintingPreference-enum">QFont::HintingPreference</a></span> <i>hintingPreference</i>)</h3>
<p>Replaces the current <a href="qrawfont.html">QRawFont</a> with the contents of the file referenced by <i>fileName</i> for the size (in pixels) given by <i>pixelSize</i>, and using the hinting preference specified by <i>hintingPreference</i>.</p>
<p>The file must reference a TrueType or OpenType font.</p>
<p><b>See also </b><a href="qrawfont.html#loadFromData">loadFromData</a>().</p>
<!-- @@@loadFromFile -->
<!-- $$$maxCharWidth[overload1]$$$maxCharWidth -->
<h3 class="fn" id="maxCharWidth"><a name="maxCharWidth"></a><span class="type"><a href="../qtcore/qtglobal.html#qreal-typedef">qreal</a></span> QRawFont::<span class="name">maxCharWidth</span>() const</h3>
<p>Returns the width of the widest character in the font.</p>
<p><b>See also </b><a href="qfontmetricsf.html#maxWidth">QFontMetricsF::maxWidth</a>().</p>
<!-- @@@maxCharWidth -->
<!-- $$$pathForGlyph[overload1]$$$pathForGlyphquint32 -->
<h3 class="fn" id="pathForGlyph"><a name="pathForGlyph"></a><span class="type"><a href="qpainterpath.html">QPainterPath</a></span> QRawFont::<span class="name">pathForGlyph</span>(<span class="type"><a href="../qtcore/qtglobal.html#quint32-typedef">quint32</a></span> <i>glyphIndex</i>) const</h3>
<p>This function returns the shape of the glyph at a given <i>glyphIndex</i> in the underlying font if the <a href="qrawfont.html">QRawFont</a> is valid. Otherwise, it returns an empty <a href="qpainterpath.html">QPainterPath</a>.</p>
<p>The returned glyph will always be unhinted.</p>
<p><b>See also </b><a href="qrawfont.html#alphaMapForGlyph">alphaMapForGlyph</a>() and <a href="qpainterpath.html#addText">QPainterPath::addText</a>().</p>
<!-- @@@pathForGlyph -->
<!-- $$$pixelSize[overload1]$$$pixelSize -->
<h3 class="fn" id="pixelSize"><a name="pixelSize"></a><span class="type"><a href="../qtcore/qtglobal.html#qreal-typedef">qreal</a></span> QRawFont::<span class="name">pixelSize</span>() const</h3>
<p>Returns the pixel size set for this <a href="qrawfont.html">QRawFont</a>. The pixel size affects how glyphs are rasterized, the size of glyphs returned by <a href="qrawfont.html#pathForGlyph">pathForGlyph</a>(), and is used to convert internal metrics from design units to logical pixel units.</p>
<p><b>See also </b><a href="qrawfont.html#setPixelSize">setPixelSize</a>().</p>
<!-- @@@pixelSize -->
<!-- $$$setPixelSize[overload1]$$$setPixelSizeqreal -->
<h3 class="fn" id="setPixelSize"><a name="setPixelSize"></a><span class="type">void</span> QRawFont::<span class="name">setPixelSize</span>(<span class="type"><a href="../qtcore/qtglobal.html#qreal-typedef">qreal</a></span> <i>pixelSize</i>)</h3>
<p>Sets the pixel size with which this font should be rendered to <i>pixelSize</i>.</p>
<p><b>See also </b><a href="qrawfont.html#pixelSize">pixelSize</a>().</p>
<!-- @@@setPixelSize -->
<!-- $$$style[overload1]$$$style -->
<h3 class="fn" id="style"><a name="style"></a><span class="type"><a href="qfont.html#Style-enum">QFont::Style</a></span> QRawFont::<span class="name">style</span>() const</h3>
<p>Returns the style of this <a href="qrawfont.html">QRawFont</a>.</p>
<p><b>See also </b><a href="qfont.html#style">QFont::style</a>().</p>
<!-- @@@style -->
<!-- $$$styleName[overload1]$$$styleName -->
<h3 class="fn" id="styleName"><a name="styleName"></a><span class="type"><a href="../qtcore/qstring.html">QString</a></span> QRawFont::<span class="name">styleName</span>() const</h3>
<p>Returns the style name of this <a href="qrawfont.html">QRawFont</a>.</p>
<p><b>See also </b><a href="qfont.html#styleName">QFont::styleName</a>().</p>
<!-- @@@styleName -->
<!-- $$$supportedWritingSystems[overload1]$$$supportedWritingSystems -->
<h3 class="fn" id="supportedWritingSystems"><a name="supportedWritingSystems"></a><span class="type">QList</span>&lt;<span class="type"><a href="qfontdatabase.html#WritingSystem-enum">QFontDatabase::WritingSystem</a></span>&gt; QRawFont::<span class="name">supportedWritingSystems</span>() const</h3>
<p>Returns a list of writing systems supported by the font according to designer supplied information in the font file. Please note that this does not guarantee support for a specific unicode point in the font. You can use the <a href="qrawfont.html#supportsCharacter">supportsCharacter</a>() to check support for a single, specific character.</p>
<p><b>Note: </b>The list is determined based on the unicode ranges and codepage ranges set in the font's OS/2 table and requires such a table to be present in the underlying font file.</p><p><b>See also </b><a href="qrawfont.html#supportsCharacter">supportsCharacter</a>().</p>
<!-- @@@supportedWritingSystems -->
<!-- $$$supportsCharacter[overload1]$$$supportsCharacterQChar -->
<h3 class="fn" id="supportsCharacter"><a name="supportsCharacter"></a><span class="type">bool</span> QRawFont::<span class="name">supportsCharacter</span>(<span class="type"><a href="../qtcore/qchar.html">QChar</a></span> <i>character</i>) const</h3>
<p>Returns <code>true</code> if the font has a glyph that corresponds to the given <i>character</i>.</p>
<p><b>See also </b><a href="qrawfont.html#supportedWritingSystems">supportedWritingSystems</a>().</p>
<!-- @@@supportsCharacter -->
<!-- $$$supportsCharacter$$$supportsCharacteruint -->
<h3 class="fn" id="supportsCharacter-1"><a name="supportsCharacter-1"></a><span class="type">bool</span> QRawFont::<span class="name">supportsCharacter</span>(<span class="type"><a href="../qtcore/qtglobal.html#uint-typedef">uint</a></span> <i>ucs4</i>) const</h3>
<p>This is an overloaded function.</p>
<p>Returns <code>true</code> if the font has a glyph that corresponds to the UCS-4 encoded character <i>ucs4</i>.</p>
<p><b>See also </b><a href="qrawfont.html#supportedWritingSystems">supportedWritingSystems</a>().</p>
<!-- @@@supportsCharacter -->
<!-- $$$swap[overload1]$$$swapQRawFont& -->
<h3 class="fn" id="swap"><a name="swap"></a><span class="type">void</span> QRawFont::<span class="name">swap</span>(<span class="type"><a href="qrawfont.html#QRawFont">QRawFont</a></span> &amp;<i>other</i>)</h3>
<p>Swaps this raw font with <i>other</i>. This function is very fast and never fails.</p>
<p>This function was introduced in Qt 5.0.</p>
<!-- @@@swap -->
<!-- $$$underlinePosition[overload1]$$$underlinePosition -->
<h3 class="fn" id="underlinePosition"><a name="underlinePosition"></a><span class="type"><a href="../qtcore/qtglobal.html#qreal-typedef">qreal</a></span> QRawFont::<span class="name">underlinePosition</span>() const</h3>
<p>Returns the position from baseline for drawing underlines below the text rendered with this font.</p>
<!-- @@@underlinePosition -->
<!-- $$$unitsPerEm[overload1]$$$unitsPerEm -->
<h3 class="fn" id="unitsPerEm"><a name="unitsPerEm"></a><span class="type"><a href="../qtcore/qtglobal.html#qreal-typedef">qreal</a></span> QRawFont::<span class="name">unitsPerEm</span>() const</h3>
<p>Returns the number of design units define the width and height of the em square for this <a href="qrawfont.html">QRawFont</a>. This value is used together with the pixel size when converting design metrics to pixel units, as the internal metrics are specified in design units and the pixel size gives the size of 1 em in pixels.</p>
<p><b>See also </b><a href="qrawfont.html#pixelSize">pixelSize</a>() and <a href="qrawfont.html#setPixelSize">setPixelSize</a>().</p>
<!-- @@@unitsPerEm -->
<!-- $$$weight[overload1]$$$weight -->
<h3 class="fn" id="weight"><a name="weight"></a><span class="type">int</span> QRawFont::<span class="name">weight</span>() const</h3>
<p>Returns the weight of this <a href="qrawfont.html">QRawFont</a>.</p>
<p><b>See also </b><a href="qfont.html#weight">QFont::weight</a>().</p>
<!-- @@@weight -->
<!-- $$$xHeight[overload1]$$$xHeight -->
<h3 class="fn" id="xHeight"><a name="xHeight"></a><span class="type"><a href="../qtcore/qtglobal.html#qreal-typedef">qreal</a></span> QRawFont::<span class="name">xHeight</span>() const</h3>
<p>Returns the xHeight of this <a href="qrawfont.html">QRawFont</a> in pixel units.</p>
<p>This is often but not always the same as the height of the character 'x'.</p>
<p><b>See also </b><a href="qfontmetricsf.html#xHeight">QFontMetricsF::xHeight</a>().</p>
<!-- @@@xHeight -->
<!-- $$$operator!=[overload1]$$$operator!=constQRawFont& -->
<h3 class="fn" id="operator-not-eq"><a name="operator-not-eq"></a><span class="type">bool</span> QRawFont::<span class="name">operator!=</span>(const <span class="type"><a href="qrawfont.html#QRawFont">QRawFont</a></span> &amp;<i>other</i>) const</h3>
<p>Returns <code>true</code> if this <a href="qrawfont.html">QRawFont</a> is not equal to <i>other</i>. Otherwise, returns <code>false</code>.</p>
<!-- @@@operator!= -->
<!-- $$$operator==[overload1]$$$operator==constQRawFont& -->
<h3 class="fn" id="operator-eq-eq"><a name="operator-eq-eq"></a><span class="type">bool</span> QRawFont::<span class="name">operator==</span>(const <span class="type"><a href="qrawfont.html#QRawFont">QRawFont</a></span> &amp;<i>other</i>) const</h3>
<p>Returns <code>true</code> if this <a href="qrawfont.html">QRawFont</a> is equal to <i>other</i>. Otherwise, returns <code>false</code>.</p>
<!-- @@@operator== -->
</div>
<div class="relnonmem">
<h2>Related Non-Members</h2>
<!-- $$$qHash$$$qHashconstQRawFont&uint -->
<h3 class="fn" id="qHash-4"><a name="qHash-4"></a><span class="type"><a href="../qtcore/qtglobal.html#uint-typedef">uint</a></span> <span class="name">qHash</span>(const <span class="type"><a href="qrawfont.html#QRawFont">QRawFont</a></span> &amp;<i>font</i>, <span class="type"><a href="../qtcore/qtglobal.html#uint-typedef">uint</a></span> <i>seed</i> = 0)</h3>
<p>Returns the hash value for <i>font</i>. If specified, <i>seed</i> is used to initialize the hash.</p>
<p>This function was introduced in Qt 5.8.</p>
<!-- @@@qHash -->
</div>
        </div>
       </div>
   </div>
   </div>
</div>
<div class="footer">
   <p>
   <acronym title="Copyright">&copy;</acronym> 2020 The Qt Company Ltd.
   Documentation contributions included herein are the copyrights of
   their respective owners.<br/>    The documentation provided herein is licensed under the terms of the    <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation    License version 1.3</a> as published by the Free Software Foundation.<br/>    Qt and respective logos are trademarks of The Qt Company Ltd.     in Finland and/or other countries worldwide. All other trademarks are property
   of their respective owners. </p>
</div>
</body>
</html>
